<template>
  <a-space>
    <a-button style="-webkit-app-region: no-drag;" @click="minimizeWin">
      <template #icon>
        <icon-minus size="16"/>
      </template>
    </a-button>
    <a-button style="-webkit-app-region: no-drag;" @click="()=>{restoreWin();isMax = false}" v-if="isMax">
      <template #icon>
        <icon-shrink size="16"/>
      </template>
    </a-button>
    <a-button style="-webkit-app-region: no-drag;" @click="()=>{maximizeWin();isMax = true}" v-else>
      <template #icon>
        <icon-expand size="16"/>
      </template>
    </a-button>

    <a-button style="-webkit-app-region: no-drag;" @click="closeWin">
      <template #icon>
        <icon-close size="16"/>
      </template>
    </a-button>
  </a-space>
</template>


<script setup lang="ts">

import {closeWin, maximizeWin, minimizeWin, restoreWin} from '../../scripts/window'
import {ref} from "vue";

let isMax = ref(false)


</script>

